<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!-- Last Modified in 2009.09.15 by LeeMinsun-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>HotSource Map</title>
		
		<!-- Load Google Map, you must insert Google Api Key -->
		<style type="text/css">
      @import url("http://www.google.com/uds/css/gsearch.css");
      @import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
    </style>
		<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAA3CxS6t0vzzv1PPj5B5O-fRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQUlzxfssAIKi9kTsaG52HQmPSR7w"></script>

   <script src="http://www.google.com/uds/api?file=uds.js&amp;v=1.0" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" type="text/javascript"></script>
		
		<script src="loadgpx.4.js" type="text/javascript"></script>
		
		<script type="text/javascript">
                        var se = document.location.search.substr(1);
                        var qa = {}; // query array
                        se.replace(/([^=]+)=([^&]*)(&|$)/g, function(){
                        qa[arguments[1]] = arguments[2];
                        return arguments[0];
                        });
			
                        var gpx = qa.gpx;
                        var choice = qa.choice;

			
			function LoadGPXFileIntoGoogleMap(map, filename)
			{
				// Remove any existing overlays from the map.
				// map.clearOverlays();



				var request = GXmlHttp.create();
				var geocoder;
				request.open("GET", filename, true);
				request.onreadystatechange = function()
				{
					if (request.readyState == 4)
					{
						parser = new GPXParser(request.responseXML, map);
						parser.SetTrackColour("#ff0000");					// Set the track line colour
						parser.SetTrackWidth(5);							// Set the track line width
						parser.SetMinTrackPointDelta(0.0000001);				
														// Set the minimum distance between track points
						parser.CenterAndZoom(request.responseXML, G_NORMAL_MAP); 
														// Center and Zoom the map over all the points.
						
                                                //parser.AddTrackpointsToMap();	 Add the trackpoints
                                                /*if (choice ==0)
                                                    {
                                                        parser.AddTrackpointsToMap();	// Add the trackpoints
                                                        parser.AddGroupPointsToMap();
                                                    }	// Add the timegrouppoints

                                                else
                                                    {parser.AddTagGroupPointsToMap();} // Add the Taggroup point
                                                */

                                                if(choice == 0)
                                                {
                                                    parser.AddTagGroupPointsToMap();
                                                }
                                                else
                                                {
                                                    parser.AddTrackpointsToMap();	// Add the trackpoints
                                                    parser.AddGroupPointsToMap();
                                                }
                                        }
				}
				request.send(null);
			}
			
			function initialize() 
			{
				if (GBrowserIsCompatible()) 
				{
					var map = new GMap2(document.getElementById("map_canvas"));
					//map.setCenter(new GLatLng(37.545840,127.001462), 13 );
					map.addControl(new GLargeMapControl());
					map.addControl(new GMapTypeControl());
					
					// 'Expression of smallpicture & picture' source is in the 'loadgpx.4.js'File 
                                        LoadGPXFileIntoGoogleMap( map , gpx);
					// bind a search control to the map, suppress result list
					map.addControl(new google.maps.LocalSearch(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(10,20)));
				}
			}
			GSearch.setOnLoadCallback(initialize);
			geocoder = new GClientGeocoder();
		</script>
  </head>
  
  <body onload="initialize()" onunload="GUnload()" style="font-family: Arial;border: 0 none;">
    <!--<div id="map_canvas" style="width: 590px; height: 578px">-->
	 <div id="map_canvas" style="position: absolute; top: 10px; left: 5px; width: 99%; height: 98%"></div>
    </div>
  </body>
</html>